package com.zhengaz.common.rabbitmq.properties;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author zhengzg
 * @create 2023-09-15 17:38
 */
@Data
@Component
@ConfigurationProperties(prefix = "cus-mq")
public class MqProperties implements InitializingBean {

    private String queue;

    private String exchange;

    private String routerKey;

    public static String QUEUE;

    public static String EXCHANGE;

    public static String ROUTER_KEY;


    @Override
    public void afterPropertiesSet() throws Exception {
        QUEUE = queue;
        EXCHANGE = exchange;
        ROUTER_KEY = routerKey;
    }
}
